package TourController

import (
    "github.com/gin-gonic/gin"
    "server/app"
    "server/service/ArticleService"
)

// 查询旅游景点列表
func FindTourList(c *gin.Context) {
    list := ArticleService.FindTourList(-1)
    app.Json(c, app.NewRest().Data(list))
}

// 查询首页旅游景点列表
func FindHomeTourList(c *gin.Context) {
    var obj struct{ Count int `json:"count"` }
    app.MustShouldBindJSON(c, &obj)

    list := ArticleService.FindTourList(obj.Count)
    app.Json(c, app.NewRest().Data(list))
}